<div class="boletas view">
<h2><?php  __('Boleta');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Cedula'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['cedula']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Nombre'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['nombre']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Apellido1'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['apellido1']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Apellido2'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['apellido2']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Telefono1'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['telefono1']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Telefono2'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['telefono2']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Telefono3'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['telefono3']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Correo'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['correo']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Provincia'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($boleta['Provincia']['id'], array('controller'=> 'provincias', 'action'=>'view', $boleta['Provincia']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Cantone'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($boleta['Cantone']['id'], array('controller'=> 'cantones', 'action'=>'view', $boleta['Cantone']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Distrito'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($boleta['Distrito']['id'], array('controller'=> 'distritos', 'action'=>'view', $boleta['Distrito']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Domicilio'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['domicilio']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Trabaja'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo ife($boleta['Boleta']['trabaja'],__('SI', true),__('NO', true)); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Lugartrabajo'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['lugartrabajo']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Empresatrabajo'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['empresatrabajo']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Procedencia'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['procedencia']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Egreso'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['egreso']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Adecuacion'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo ife($boleta['Boleta']['adecuacion'],__('SI', true),__('NO', true)); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Hora'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Boleta']['hora']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Modo'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $boleta['Modo']['nombre'];
			//$html->link(, array('controller'=> 'modos', 'action'=>'view', $boleta['Modo']['id'])); 
			?>
			&nbsp;
		</dd>
	</dl>
</div>
<!--
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit Boleta', true), array('action'=>'edit', $boleta['Boleta']['id'])); ?> </li>
		<li><?php echo $html->link(__('Delete Boleta', true), array('action'=>'delete', $boleta['Boleta']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $boleta['Boleta']['id'])); ?> </li>
		<li><?php echo $html->link(__('List Boletas', true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Boleta', true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Modos', true), array('controller'=> 'modos', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Modo', true), array('controller'=> 'modos', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Provincias', true), array('controller'=> 'provincias', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Provincia', true), array('controller'=> 'provincias', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Cantones', true), array('controller'=> 'cantones', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Cantone', true), array('controller'=> 'cantones', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Distritos', true), array('controller'=> 'distritos', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Distrito', true), array('controller'=> 'distritos', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Areas', true), array('controller'=> 'areas', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Areas', true), array('controller'=> 'areas', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Dias', true), array('controller'=> 'dias', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Dia', true), array('controller'=> 'dias', 'action'=>'add')); ?> </li>
	</ul>
</div>
-->
<div class="related">
	<?php if (!empty($boleta['Area'])):?>
	<h3><?php __('Related Areas');?></h3>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Materia Id'); ?></th>
		<th><?php __('Cantidad'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($boleta['Area'] as $areas):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>

			<td><?php echo $areas['Materia']['nombre'];?></td>
			<td><?php echo $areas['cantidad'];?></td>

		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

</div>

<div class="related">
	
	<?php if (!empty($boleta['Dia'])):?>
	<h3><?php __('Related Dias');?></h3>
	<table cellpadding = "0" cellspacing = "0">
	<tr>

		<th><?php __('Nombre'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($boleta['Dia'] as $dia):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $dia['nombre'];?></td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
</div>